
import Graph
import random

# this class builds a tree randomly containing vertexNum vertices
class RandomGraphBuilder:
    def __init__(self, vertexNum):
        self.VertexNum = vertexNum
        
    def buildTree(self):
        random.seed()
        tree = Graph.Graph();
        tree.addVertex(-1)
        for i in range(self.VertexNum):
            j = random.randint(0,i) 
            sanity = tree.addVertex(j)
            if sanity == False:
                print ("id not entered!!!!!!!!!!!! randomed " + str(j))
        return tree